package cn.itcast.day05.demo02;

public class Demo01StringEquals {
    public static void main(String[] args) {
        String str1 = "Hello";
        String str2 = "Hello";
        char[] charArray = {'H', 'e', 'l', 'l', 'o'};
        String str3 = new String(charArray);
        System.out.println(str1.equals(str2));
        System.out.println(str2.equals(str3));
        System.out.println(str1.equals("Hello"));
        System.out.println("Hello".equals(str1));
        String str4 = "hello";
        System.out.println(str1.equals(str4));
        System.out.println("=================");
        String str5 = "abc";
        System.out.println("abc".equals(str5));
        System.out.println(str5.equals("abc"));
        System.out.println("=================");
        String strA = "Java";
        String strB = "java";
        System.out.println(strA.equals(strB));
        System.out.println(strA.equalsIgnoreCase(strB));
    }
}
